<%= render(:partial => "manager_header")%>

<%= form_for(@map, :as => :map, :url => {:action => :update_value_map}, :html => {:id => 'tr8n_language_case_form', :method => :post}) do |form| %>
<div id="tr8n_language_case_exception_container" style="border: 1px dotted #ccc; padding:5px;">
    <%= hidden_field_tag :origin, params[:origin] %>
    <%= hidden_field_tag :map_id, @map.id %>
    <%= hidden_field_tag :case_key, @map.keyword %>

    <table cellpadding="0" celspacing="0" style="width:100%">
    <% tr8n_current_language.cases.each do |lcase| %>
    <tr>
        <td style="padding:2px;">
				    <div style="padding-bottom:2px;font-size:10px;color:grey;">
						  <div style="float:right">
						  	(::<%=lcase.keyword%>)
						  </div>
							<div style="font-weight:bold;">
              <%=lcase.native_name%>:
							</div> 
            </div>
						
            <%= text_field_tag "map[map][#{lcase.keyword}]", @map.implied_value_for(lcase.keyword), :style=>"width:99%;padding: 3px 0px;" %>
            <div style="color:#ccc;">
             <%=lcase.description%>
            </div>
        </td>
    </tr>
    <% end %>
    </table>

    <div style="padding:5px;">
      <%=link_to(trla("Click here if the cases depend on the token gender and the gender is not implied in the word itself."), 
            :case_id => params[:case_id], :rule_id => params[:rule_id], 
            :case_key => params[:case_key], :mode => :gender_based,
            :origin => params[:origin]
      ) %>
    </div>
    <div style="padding:5px;">
      <%=link_to(trla("Click here if this word is not an exceptional case and can be configured using rules."), 
                :case_id => params[:case_id], :rule_id => params[:rule_id], 
                :case_key => params[:case_key], :mode => :rules_based, :reset => true,
                :origin => params[:origin]  
      )%>
    </div>

  <div id="tr8n_language_cases_buttons" style="text-align:center;padding:10px;">
      <button type="submit" class="translator_btn translator_submit_btn" onClick="Tr8n.Effects.hide('tr8n_language_case_exception_container');Tr8n.Effects.show('tr8n_language_case_submit_spinner'); resizeFrame(); Tr8n.Effects.submit('tr8n_language_case_form'); return false;">
          <span><%=trla("Save")%></span>
      </button>
  </div>
</div>
<% end %>    


